<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>土豆覆盖练习.html</title>
    <style>
        .con {
            position: relative;
            width: 290px;
            height: 163px;
            margin: auto;
        }
        .con img {
            width: 290px;
        }
        .mask {
            width: 290px;
            height: 163px;
            background-color: rgba(0, 0, 0, 0.3);
            position: absolute;
            display: none;
        }

        .con:hover .mask {
            display: block;
        }
    </style>
</head>
<body>
    <div class="con">
        <div class="mask"></div>
        <img src="images/yimiao.jpeg" alt="">
    </div>
</body>
</html>